package com.financing.wap.dao;


import java.util.Date;
import java.util.List;
import java.util.Map;

import com.financing.wap.dto.CorpFaUserDTO;
import com.financing.wap.dto.FaUserDTO;
import com.financing.wap.dto.FaUserWechatDTO;
import com.financing.wap.dto.UserDTO;
import com.financing.wap.vo.AdQueryVo;

public interface IUserDao extends IBaseDao<UserDTO, Integer> {
	/**
	 * 根据用户名密码查询用户信息
	 * @param user
	 * @return
	 */
	public UserDTO getUserByUF(UserDTO user);
	
	/**
	 * 注册用户
	 * @param user
	 * @return
	 */
	public String registerUser(UserDTO user);
	
	/**
	 * 判断用户名是否已经被注册
	 * 如果已经被注册：返回true
	 * 如果没有被注册：返回false
	 */
	public boolean isMobileRegistered(String userName);
	
	/**
	 * 根据用户Id查询用户
	 * @param user
	 * @return
	 */
	public CorpFaUserDTO getUserById(String userId);
	
	/**
	 * 更新FA信息
	 * @param dto
	 * @return id
	 */
	public String updateFaUserInfo(FaUserDTO dto);
	
	/**
	 * 根据sourceCode查询注册统计数
	 * @param id
	 * @return
	 */
	public int queryCountBySourceCode(String id);

	/**根据用户手机号
	 * @param user
	 * @return
	 */
	public UserDTO queryUserByMobile(UserDTO user);
	
	/**根据用户id
	 * @param user
	 * @return
	 */
	public UserDTO queryUserById(String userId);
	
	/**
	 * 
	 * @Title: queryAdRegInfo
	 * @Description: 查询ad广告带来的注册信息 
	 * @param @param createDate
	 * @param @return   
	 * @return List<AdQueryVo>   
	 * @throws
	 */
	public List<AdQueryVo> queryAdRegInfo(Date createDate);

	/**
	 * 
	 * @Title: getInviteFaListByUserId
	 * @Description:  查询当前邀请理财列表  
	 * @param @param createDate
	 * @param @return   
	 * @return List<AdQueryVo>   
	 * @throws
	 */
	public List<UserDTO> getInviteFaListByUserId(Map<String, Object> queryParams) throws Exception;
	
	/**
	 * 查询当前邀请理财列表总数
	 * @param id userID
	 * @return
	 */
	public int getInviteFaListByUserIdCount(UserDTO user) throws Exception;

	/**
	 * 根据参数查询用户信息
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public UserDTO getUser(UserDTO user)throws Exception;

	public UserDTO queryUserLoginName(UserDTO loginUser);

	public List<Map<String, Object>> getSFAList(Map<String, Object> queryParams)throws Exception;

	public int getSFAListCount(Map<String, Object> queryParams)throws Exception;

	public Map<String, Object> getUser(Map<String, Object> queryParams)throws Exception;

	public UserDTO getUserToSendEmail(UserDTO user);
	
	/**
	 * 获取微信信息
	 * @param faUserWechatDTO
	 * @return
	 * @throws Exception
	 */
	public FaUserWechatDTO getFaUserWechatDTO(FaUserWechatDTO faUserWechatDTO)throws Exception;

	/**
	 * 修改-用户
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public void updateUser(UserDTO user)throws Exception;

	/**
	 * 修改-用户Force
	 * @param user
	 * @return
	 * @throws Exception
	 */
	public void updateUserForce(UserDTO user)throws Exception;
	
	/**
	 * 判断用户名是否已经被注册-用户新增字段(`IS_REGISTER`  是否注册:0未注册，1已注册)
	 * 如果已经被注册：返回true
	 * 如果没有被注册：返回false
	 */
	public String isMobileRegisteredForSFA(String userName);

	public String isMobileUpdateForSFA(UserDTO user);
	
	/**
	 * 查询多个用户头像
	 * @param ids
	 * @return
	 */
	public List<UserDTO> queryFaImage (List<Integer> ids);
	/***
	 * 用户答题自动审核通过
	 * @param user
	 * @return
	 */
	public String updatefaUserInfoAutoPass(UserDTO user);
}